# $Id: PKGBUILD 122022 2011-05-01 17:05:32Z angvp $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=python2-cairo
pkgver=1.10.0
pkgrel=1
pkgdesc="Python2 bindings for the cairo graphics library"
arch=('i686' 'x86_64')
license=('LGPL' 'MPL')
depends=('python2' 'cairo')
options=('!libtool')
provides=("pycairo=${pkgver}")
conflicts=('pycairo')
replaces=('pycairo')
source=(http://cairographics.org/releases/py2cairo-${pkgver}.tar.bz2)
url="http://www.cairographics.org/pycairo"
md5sums=('20337132c4ab06c1146ad384d55372c5')

build() {
  cd "${srcdir}/py2cairo-${pkgver}"
  sed -i 's:bin/env python:bin/env python2:' waf
  python2 ./waf --version
  pushd .waf-*
  popd
  PYTHON=/usr/bin/python2 ./waf configure --prefix=/usr
  PYTHON=/usr/bin/python2 ./waf build
}

package() {
  cd "${srcdir}/py2cairo-${pkgver}"
  PYTHON=/usr/bin/python2 ./waf install --destdir="${pkgdir}"
}
